[アップデート] Amazon FSx for NetApp ONTAPでFlexGroupのバックアップができるようになりました #AWSreInvent

[アップデート] Amazon FSx for NetApp ONTAPでFlexGroupのバックアップができるようになりました #AWSreInvent

FlexGroupが使いやすくなりました
Clock Icon2023.11.28

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

FlexGroupもバックアップしたい

こんにちは、のんピ(@non____97)です。

皆さんはAmazon FSx for NetApp ONTAP(以降FSxN)のFlexGroupをバックアップしたいなと思ったことはありますか? 私はあります。

以下記事で紹介しているとおり、FSxNでもFlexGroupを作成することは可能です。FlexGroupの詳細な説明はこちらの記事をご覧ください。

https://dev.classmethod.jp/articles/amazon-fsx-for-netapp-ontap-flexgroup/

ですが、上述の記事でも紹介しているように、FSxのバックアップ機能でバックアップすることはできませんでした。

今回のアップデートにより、FlexGroupのボリュームもFSxのバックアップ機能でバックアップできるようになりました。また、AWSマネジメントコンソールやAWS CLIなどからでもFlexGroupを作成できるようになりました。

https://aws.amazon.com/about-aws/whats-new/2023/11/manage-back-up-fsx-netapp-flexgroup-volumes-aws-console-api/

AWS Blogsにも投稿されています。

https://aws.amazon.com/blogs/aws/flexgroup-volume-management-for-amazon-fsx-for-netapp-ontap-is-now-available/

実際に触ってみたので紹介します。

やってみた

FlexGroupの作成

せっかくなので、AWSマネジメントコンソールからFlexGroupを作成します。

FlexGroupでボリュームを作成したいのでボリュームタイプでFlexGroupを選択します。せっかくのFlexGroupなのでサイズは500TiBとします。ちなみにFlexVolumeの最大は300TiBです。

FlexGroupの作成

その他の設定は特別なことはしていません。

FlexGroupの作成_2

数分するとFlexGroupの作成が完了しました。全構成銘柄となっているのはおそらくFlexGroupのコンスティチュエントボリューム(メンバーボリューム)の数でしょう。

作成したFlexGroupの確認

ONTAP CLIからも作成したFlexGroupを確認します。

::> volume show -volume fg_vol
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
svm       fg_vol       -            online     RW        500TB    852.0GB    0%

::> volume show -volume fg_vol -instance

                                      Vserver Name: svm
                                       Volume Name: fg_vol
                                    Aggregate Name: -
     List of Aggregates for FlexGroup Constituents: aggr1
                                   Encryption Type: none
                  List of Nodes Hosting the Volume: FsxId0762660cbce3713bf-01
                                       Volume Size: 500TB
                                Volume Data Set ID: -
                         Volume Master Data Set ID: 2163879581
                                      Volume State: online
                                      Volume Style: flex
                             Extended Volume Style: flexgroup
                           FlexCache Endpoint Type: none
                            Is Cluster-Mode Volume: true
                             Is Constituent Volume: false
                     Number of Constituent Volumes: 8
                                     Export Policy: default
                                           User ID: 0
                                          Group ID: 0
                                    Security Style: unix
                                  UNIX Permissions: ---rwxr-xr-x
                                     Junction Path: /fg_vol
                              Junction Path Source: RW_volume
                                   Junction Active: true
                            Junction Parent Volume: svm_root
                                           Comment:
                                    Available Size: 852.0GB
                                   Filesystem Size: 500TB
                           Total User-Visible Size: 475TB
                                         Used Size: 4.00GB
                                   Used Percentage: 0%
              Volume Nearly Full Threshold Percent: 90%
                     Volume Full Threshold Percent: 98%
                                  Maximum Autosize: 600TB
                                  Minimum Autosize: 500TB
                Autosize Grow Threshold Percentage: 98%
              Autosize Shrink Threshold Percentage: 50%
                                     Autosize Mode: off
               Total Files (for user-visible data): 15938355160
                Files Used (for user-visible data): 775
                         Space Guarantee in Effect: true
                               Space SLO in Effect: true
                                         Space SLO: none
                             Space Guarantee Style: none
                                Fractional Reserve: 0%
                                       Volume Type: RW
                 Snapshot Directory Access Enabled: true
                Space Reserved for Snapshot Copies: 5%
                             Snapshot Reserve Used: 0%
                                   Snapshot Policy: default
                                     Creation Time: Mon Nov 27 17:37:46 2023
                                          Language: C.UTF-8
                                      Clone Volume: false
                                         Node name: -
                         Clone Parent Vserver Name: -
                           FlexClone Parent Volume: -
                                     NVFAIL Option: off
                             Volume's NVFAIL State: false
           Force NVFAIL on MetroCluster Switchover: off
                         Is File System Size Fixed: false
                        (DEPRECATED)-Extent Option: off
                     Reserved Space for Overwrites: 2GB
                 Primary Space Management Strategy: volume_grow
                          Read Reallocation Option: off
       Naming Scheme for Automatic Snapshot Copies: create_time
                  Inconsistency in the File System: false
                      Is Volume Quiesced (On-Disk): false
                    Is Volume Quiesced (In-Memory): false
         Volume Contains Shared or Compressed Data: true
                 Space Saved by Storage Efficiency: 0B
            Percentage Saved by Storage Efficiency: 0%
Space Saved by Deduplication Along With VBN ZERO Savings: 0B
                 Percentage Saved by Deduplication: 0%
     Unique Data Which Got Shared by Deduplication: 0B
                        Space Saved by Compression: 0B
             Percentage Space Saved by Compression: 0%
               Volume Size Used by Snapshot Copies: 0B
                                        Block Type: 64-bit
                                  Is Volume Moving: false
                    Flash Pool Caching Eligibility: read-write
     Flash Pool Write Caching Ineligibility Reason: -
                           Constituent Volume Role: -
                             QoS Policy Group Name: -
                    QoS Adaptive Policy Group Name: -
                               Caching Policy Name: -
                   Is Volume Move in Cutover Phase: false
           Number of Snapshot Copies in the Volume: 0
   VBN_BAD may be present in the active filesystem: false
                   Is Volume on a hybrid aggregate: false
                          Total Physical Used Size: 4.00GB
                          Physical Used Percentage: 0%
                                    FlexGroup Name: fg_vol
                             Is Volume a FlexGroup: true
                                     SnapLock Type: non-snaplock
                             Vserver DR Protection: -
                      Enable or Disable Encryption: false
                               Is Volume Encrypted: false
                                  Encryption State: none
                                 Encryption Key ID:
                      Encryption Key Creation Time: -
                                       Application: -
                     Is Fenced for Protocol Access: false
                       Protocol Access Fence Owner: -
                                   Is SIDL enabled: off
                             Over Provisioned Size: 499.2TB
                   Available Snapshot Reserve Size: 0B
                                 Logical Used Size: 4.00GB
                           Logical Used Percentage: 0%
                            Logical Available Size: -
            Logical Size Used by Active Filesystem: 4.00GB
                Logical Size Used by All Snapshots: 0B
                           Logical Space Reporting: false
                         Logical Space Enforcement: false
                             Volume Tiering Policy: auto
               Performance Tier Inactive User Data: -
       Performance Tier Inactive User Data Percent: -
Tags to be Associated with Objects Stored on a FabricPool: -
Does the Object Tagging Scanner Need to Run on This Volume: false
                Is File System Analytics Supported: true
     Reason File System Analytics is not Supported: -
                       File System Analytics State: off
               File System Analytics Scan Progress: -
                           Activity Tracking State: off
                    Is Activity Tracking Supported: true
         Reason Activity Tracking Is Not Supported: -
                                    Is SMBC Master: false
                          Is SMBC Failover Capable: false
                                    SMBC Consensus: -
                             Anti-ransomware State: disabled
                                     Granular data: disabled
                      Enable Snapshot Copy Locking: false
                                       Expiry Time: -
                              ComplianceClock Time: -
          Are Large Size Volumes and Files Enabled: false

::> volume show -volume fg_vol* -is-constituent true
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
svm       fg_vol__0001 aggr1        online     RW      62.50TB    852.0GB    0%
svm       fg_vol__0002 aggr1        online     RW      62.50TB    852.0GB    0%
svm       fg_vol__0003 aggr1        online     RW      62.50TB    852.0GB    0%
svm       fg_vol__0004 aggr1        online     RW      62.50TB    852.0GB    0%
svm       fg_vol__0005 aggr1        online     RW      62.50TB    852.0GB    0%
svm       fg_vol__0006 aggr1        online     RW      62.50TB    852.0GB    0%
svm       fg_vol__0007 aggr1        online     RW      62.50TB    852.0GB    0%
svm       fg_vol__0008 aggr1        online     RW      62.50TB    852.0GB    0%
8 entries were displayed.

確かにコンスティチュエントボリュームが8つのFlexGroupが作成されていますね。

AWS公式ドキュメントにもコンスティチュエントボリュームはデフォルト8つ記載がありました。

A FlexGroup volume is made up of constituents, which are FlexVol volumes. By default, FSx for ONTAP assigns eight constituents to a FlexGroup volume per HA pair.

Volume styles - FSx for ONTAP

なお、CreateOntapVolumeConfigurationにはコンスティチュエントボリューム数を指定するパラメーターはありませんでした。コンスティチュエントボリュームを指定したい場合はONTAP CLIから作成することになりそうです。

FlexGroupへのファイルの書き込み

バックアップをする前に作成したFlexGroupへ適当にファイルを書き込みます。

まず、FlexGroupのボリュームをマウントします。

# マウントポイントの作成
$ sudo mkdir -p /mnt/fsxn/fg_vol

# FlexGroupのマウント
$ sudo mount -t nfs4 svm-04855fdf5ed7737a8.fs-0762660cbce3713bf.fsx.us-east-1.amazonaws.com:/fg_vol /mnt/fsxn/fg_vol/

# マウントされたことを確認
$ df -hT -t nfs4
Filesystem                                                                     Type  Size  Used Avail Use% Mounted on
svm-04855fdf5ed7737a8.fs-0762660cbce3713bf.fsx.us-east-1.amazonaws.com:/fg_vol nfs4  475T  475T  853G 100% /mnt/fsxn/fg_vol

今回は1GiBのファイルを10個書き込みます。

$ for i in {1..10}; do
   sudo dd if=/dev/urandom of=/mnt/fsxn/fg_vol/file${i} bs=1M count=1024
done
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 6.33752 s, 169 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 7.22991 s, 149 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 7.2566 s, 148 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 7.18079 s, 150 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 7.21899 s, 149 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 7.21765 s, 149 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 7.25334 s, 148 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 7.19365 s, 149 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 7.23198 s, 148 MB/s
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 7.24761 s, 148 MB/s

# ファイルが作成されたことを確認
$ ls -l /mnt/fsxn/fg_vol
total 10527120
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file1
-rw-r--r--. 1 root root 1073741824 Nov 27 17:52 file10
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file2
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file3
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file4
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file5
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file6
-rw-r--r--. 1 root root 1073741824 Nov 27 17:52 file7
-rw-r--r--. 1 root root 1073741824 Nov 27 17:52 file8
-rw-r--r--. 1 root root 1073741824 Nov 27 17:52 file9

$ df -hT -t nfs4
Filesystem                                                                     Type  Size  Used Avail Use% Mounted on
svm-04855fdf5ed7737a8.fs-0762660cbce3713bf.fsx.us-east-1.amazonaws.com:/fg_vol nfs4  475T  475T  842G 100% /mnt/fsxn/fg_vol

ONTAP CLIからも確認します。

::> volume show -volume fg_vol* -is-constituent true -fields used
vserver volume       used
------- ------------ ------
svm     fg_vol__0001 1.51GB
svm     fg_vol__0002 2.53GB
svm     fg_vol__0003 1.51GB
svm     fg_vol__0004 1.51GB
svm     fg_vol__0005 1.51GB
svm     fg_vol__0006 1.51GB
svm     fg_vol__0007 1.51GB
svm     fg_vol__0008 2.53GB
8 entries were displayed.

各コンスティチュエントボリュームにバランシングされてファイルが保存されていることがわかります。

FlexGroupのバックアップ

本題のFlexGroupのバックアップを行います。

マネジメントコンソールからFlexVolumeと同様にボリュームを選択してバックアップを行います。

バックアップの作成

ONTAP CLIからバックアップを取得したタイミングでSnapshotが作成されているか確認します。

::> snapshot show -volume fg_vol
                                                                 ---Blocks---
Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
svm      fg_vol
                  backup-03f97a5040dee27a3               10.14GB     0%   50%
                  hourly.2023-11-27_1805                 10.14GB     0%   50%
2 entries were displayed.

::> snapshot show -volume fg_vol -snapshot backup-03f97a5040dee27a3 -instance

                              Vserver: svm
                               Volume: fg_vol
                             Snapshot: backup-03f97a5040dee27a3
                        Creation Time: Mon Nov 27 17:57:47 2023
                        Snapshot Busy: false
                       List of Owners: -
                        Snapshot Size: 10.14GB
           Percentage of Total Blocks: 0%
            Percentage of Used Blocks: 50%
                              Comment: -
                      7-Mode Snapshot: false
      Label for SnapMirror Operations: -
                       Snapshot State: valid
                 Constituent Snapshot: false
                          Expiry Time: -
                 SnapLock Expiry Time: -

backup-から始まるSnapshotが作成されていますね。

バックアップ取得時の管理アクティビティの監査ログも確認します。

::> security audit log show -fields timestamp, node, application, location, vserver, username, input, state, message -state Error|Success -application http -timestamp >"Mon Nov 27 17:50:00 2023"
timestamp                  node                      application location     vserver                username input                                   state   message
-------------------------- ------------------------- ----------- ------------ ---------------------- -------- ----------------------------------------------------------------- ------- -------
"Mon Nov 27 17:53:39 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147 FsxId0762660cbce3713bf admin    GET /api/private/cli/storage/failover?fields=node,possible,reason Success -
"Mon Nov 27 17:53:39 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147 FsxId0762660cbce3713bf admin    GET /api/private/cli/storage/aggregate?fields=raidstatus%2Ccomposite%2Croot%2Cuuid
                                   Success -
"Mon Nov 27 17:57:35 2023" FsxId0762660cbce3713bf-01 http        52.204.237.29
                                                                              FsxId0762660cbce3713bf fsx-control-plane
                                                                                                              GET /api/private/cli/volume/?instance-uuid=acf78fa0-8d4b-11ee-84de-4b7ecb818153&fields=constituent_count
                                   Success -
"Mon Nov 27 17:57:36 2023" FsxId0762660cbce3713bf-01 http        52.87.48.44  FsxId0762660cbce3713bf fsx-control-plane
                                                                                                              POST /api/cluster/licensing/access_tokens/ : {"client_secret":***,"grant_type":"client_credentials","client_id":"clientId"}
                                   Success -
"Mon Nov 27 17:57:36 2023" FsxId0762660cbce3713bf-01 http        52.87.48.44  FsxId0762660cbce3713bf fsx-control-plane
                                                                                                              POST /api/snapmirror/relationships/?return_records=true : {"destination":{"path":"amazon-fsx-ontap-backup-us-east-1-b0bc6fd9-bdd6a1d0:/objstore/0c000000-01f6-b3ef-0000-0000006db8d5","uuid":"0c000000-01f6-b3ef-0000-0000006db8d5"},"policy":{"name":"FSxPolicy"},"source":{"path":"svm:fg_vol"}}
                                   Success -
"Mon Nov 27 17:57:36 2023" FsxId0762660cbce3713bf-01 http        52.87.48.44  FsxId0762660cbce3713bf fsx-control-plane
                                                                                                              POST /api/snapmirror/relationships : uuid=7275792b-8d4e-11ee-84de-4b7ecb818153 isv_name="AWS FSx"
                                   Success -
"Mon Nov 27 17:57:47 2023" FsxId0762660cbce3713bf-01 http        52.87.48.44  FsxId0762660cbce3713bf fsx-control-plane
                                                                                                              POST /api/storage/volumes/acf78fa0-8d4b-11ee-84de-4b7ecb818153/snapshots?return_records=true : {"name":"backup-03f97a5040dee27a3"}
                                   Success -
"Mon Nov 27 17:57:57 2023" FsxId0762660cbce3713bf-01 http        52.204.237.29
                                                                              FsxId0762660cbce3713bf fsx-control-plane
                                                                                                              POST /api/cluster/licensing/access_tokens/ : {"client_secret":***,"grant_type":"client_credentials","client_id":"clientId"}
                                   Success -
"Mon Nov 27 17:57:58 2023" FsxId0762660cbce3713bf-01 http        52.204.237.29
                                                                              FsxId0762660cbce3713bf fsx-control-plane
                                                                                                              POST /api/snapmirror/relationships/7275792b-8d4e-11ee-84de-4b7ecb818153/transfers : isv_name="AWS FSx"
                                   Success -
"Mon Nov 27 17:57:58 2023" FsxId0762660cbce3713bf-01 http        52.204.237.29
                                                                              FsxId0762660cbce3713bf fsx-control-plane
                                                                                                              POST /api/snapmirror/relationships/7275792b-8d4e-11ee-84de-4b7ecb818153/transfers?return_records=true : {"source_snapshot":"backup-03f97a5040dee27a3"}
                                   Success -

timestamp                  node                      application location     vserver                username input                                   state   message
-------------------------- ------------------------- ----------- ------------ ---------------------- -------- ----------------------------------------------------------------- ------- -------
"Mon Nov 27 17:58:11 2023" FsxId0762660cbce3713bf-01 http        35.169.159.241
                                                                              FsxId0762660cbce3713bf fsx-control-plane
                                                                                                              GET /api/private/cli/volume/?fields=uuid%2Cconstituent_count      Success -
"Mon Nov 27 17:58:13 2023" FsxId0762660cbce3713bf-01 http        35.169.159.241
                                                                              FsxId0762660cbce3713bf fsx-control-plane
                                                                                                              GET /api/private/cli/vserver/cifs/check/?fields=status%2Cstatus_details
                                   Success -
"Mon Nov 27 18:03:39 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147 FsxId0762660cbce3713bf admin    GET /api/private/cli/storage/failover?fields=node,possible,reason Success -
"Mon Nov 27 18:03:39 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147 FsxId0762660cbce3713bf admin    GET /api/private/cli/storage/aggregate?fields=raidstatus%2Ccomposite%2Croot%2Cuuid
                                   Success -
"Mon Nov 27 18:13:35 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147 FsxId0762660cbce3713bf admin    GET /api/private/cli/storage/failover?fields=node,possible,reason Success -
"Mon Nov 27 18:13:36 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147 FsxId0762660cbce3713bf admin    GET /api/private/cli/storage/aggregate?fields=raidstatus%2Ccomposite%2Croot%2Cuuid
                                   Success -
"Mon Nov 27 18:18:38 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147 FsxId0762660cbce3713bf admin    GET /api/private/cli/storage/failover?fields=node,possible,reason Success -
"Mon Nov 27 18:18:38 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147 FsxId0762660cbce3713bf admin    GET /api/private/cli/storage/aggregate?fields=raidstatus%2Ccomposite%2Croot%2Cuuid
                                   Success -
18 entries were displayed.

裏側でSnapMirrorが動いていそうですね。

20分ほど待つとバックアップの作成が完了しました。

バックアップが完了したことを確認

FlexGroupのバックアップからリストア

FlexGroupのバックアップからリストアを行います。

それではマネジメントコンソールからリストアします。

と、したいところでしたが、いくらリストア時のパラメーターを入力して確認をクリックしても無反応でした。言語の問題か?とも思って英語に切り替えても変わりありませんでした。

バックアップからリストア_2

AWS CLIで試してみます。

$ aws fsx create-volume-from-backup \
  --backup-id backup-03f97a5040dee27a3 \
  --name restored_fg_vol \
  --ontap-configuration JunctionPath='/restored_fg_vol',SizeInMegabytes=524288000,StorageVirtualMachineId='svm-04855fdf5ed7737a8'
{
    "Volume": {
        "CreationTime": "2023-11-28T07:25:17.952000+00:00",
        "FileSystemId": "fs-0762660cbce3713bf",
        "Lifecycle": "CREATING",
        "Name": "restored_fg_vol",
        "OntapConfiguration": {
            "FlexCacheEndpointType": "NONE",
            "JunctionPath": "/restored_fg_vol",
            "SizeInMegabytes": 524288000,
            "StorageEfficiencyEnabled": true,
            "StorageVirtualMachineId": "svm-04855fdf5ed7737a8",
            "StorageVirtualMachineRoot": false,
            "TieringPolicy": {
                "CoolingPeriod": 2,
                "Name": "SNAPSHOT_ONLY"
            },
            "OntapVolumeType": "DP",
            "SnapshotPolicy": "default",
            "CopyTagsToBackups": false
        },
        "ResourceARN": "arn:aws:fsx:us-east-1:<AWSアカウントID>:volume/fs-0762660cbce3713bf/fsvol-0fa30afe7ed546c0c",
        "VolumeId": "fsvol-0fa30afe7ed546c0c",
        "VolumeType": "ONTAP"
    }
}

こちらは正常に受け付けられました。

数分待つとリストアが完了していました。

リストアしたボリュームの確認

NFSクライアントからマウントしてみて、バックアップ取得時に存在したファイルがあることを確認します。

$ sudo mkdir -p /mnt/fsxn//restored_fg_vol

$ sudo mount -t nfs4 svm-04855fdf5ed7737a8.fs-0762660cbce3713bf.fsx.us-east-1.amazonaws.com:/restored_fg_vol /mnt/fsxn/restored_fg_vol

$ df -hT -t nfs4
Filesystem                                                                              Type  Size  Used Avail Use% Mounted on
svm-04855fdf5ed7737a8.fs-0762660cbce3713bf.fsx.us-east-1.amazonaws.com:/fg_vol          nfs4  475T  475T  842G 100% /mnt/fsxn/fg_vol
svm-04855fdf5ed7737a8.fs-0762660cbce3713bf.fsx.us-east-1.amazonaws.com:/restored_fg_vol nfs4  500T  500T  831G 100% /mnt/fsxn/restored_fg_vol

$ ls -l /mnt/fsxn/restored_fg_vol/
total 10527120
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file1
-rw-r--r--. 1 root root 1073741824 Nov 27 17:52 file10
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file2
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file3
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file4
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file5
-rw-r--r--. 1 root root 1073741824 Nov 27 17:51 file6
-rw-r--r--. 1 root root 1073741824 Nov 27 17:52 file7
-rw-r--r--. 1 root root 1073741824 Nov 27 17:52 file8
-rw-r--r--. 1 root root 1073741824 Nov 27 17:52 file9

リストアしたボリュームにファイルが存在していますね。

ONTAP CLIからも確認します。

# ボリュームの確認
::> volume show -volume restored_fg_vol, fg_vol
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
svm       fg_vol       -            online     RW        500TB    841.7GB    0%
svm       restored_fg_vol
                       -            online     RW        500TB    830.2GB    0%
2 entries were displayed.

::> volume show -volume restored_fg_vol*, fg_vol* -is-constituent true -fields used
vserver volume       used
------- ------------ ------
svm     fg_vol__0001 1.51GB
svm     fg_vol__0002 2.53GB
svm     fg_vol__0003 1.51GB
svm     fg_vol__0004 1.51GB
svm     fg_vol__0005 1.51GB
svm     fg_vol__0006 1.51GB
svm     fg_vol__0007 1.51GB
svm     fg_vol__0008 2.53GB
svm     restored_fg_vol__0001
                     1.08GB
svm     restored_fg_vol__0002
                     2.09GB
svm     restored_fg_vol__0003
                     1.08GB
svm     restored_fg_vol__0004
                     1.08GB
svm     restored_fg_vol__0005
                     1.08GB
svm     restored_fg_vol__0006
                     1.08GB
svm     restored_fg_vol__0007
                     1.08GB
svm     restored_fg_vol__0008
                     2.09GB
16 entries were displayed.

# Snapshotの確認
::> snapshot show -volume restored_fg_vol, fg_vol
                                                                 ---Blocks---
Vserver  Volume   Snapshot                                  Size Total% Used%
-------- -------- ------------------------------------- -------- ------ -----
svm      fg_vol
                  backup-03f97a5040dee27a3               10.14GB     0%   50%
                  daily.2023-11-28_0010                  10.15GB     0%   50%
                  hourly.2023-11-28_0205                 10.15GB     0%   50%
                  hourly.2023-11-28_0305                 10.15GB     0%   50%
                  hourly.2023-11-28_0405                 10.15GB     0%   50%
                  hourly.2023-11-28_0505                 10.15GB     0%   50%
                  hourly.2023-11-28_0605                 10.15GB     0%   50%
                  hourly.2023-11-28_0705                 10.15GB     0%   50%
         restored_fg_vol
                  backup-03f97a5040dee27a3               10.15GB     0%   50%
9 entries were displayed.

# リストア時の管理アクティビティの監査ログの確認
::> security audit log show -fields timestamp, node, application, location, vserver, username, input, state, message -state Error|Success -application http -timestamp >"Tue Nov 28 7:25:00 2023"

Error: "Tue Nov 28 7:25:00 2023" is an invalid value for field "-timestamp <Date>"

FsxId0762660cbce3713bf::>
FsxId0762660cbce3713bf::> security audit log show -fields timestamp, node, application, location, vserver, username, input, state, message -state Error|Success -application http -timestamp >"Tue Nov 28 07:25:00 2023"
timestamp                  node                      application location      vserver                username          input                                                                                         state   message
-------------------------- ------------------------- ----------- ------------- ---------------------- ----------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------- -------
"Tue Nov 28 07:28:24 2023" FsxId0762660cbce3713bf-01 http        52.204.237.29 FsxId0762660cbce3713bf fsx-control-plane POST /api/storage/volumes/?return_records=true : {"comment":"FSx.tmp.fsvol-0fa30afe7ed546c0c.18ad67fd-2434-4cc8-985a-2d4cedf2cfcd","language":"c.utf_8","name":"restored_fg_vol","size":549755813888000,"style":"flexgroup","tiering":{"policy":"SNAPSHOT_ONLY","min_cooling_days":2},"type":"dp","aggregates":[{"name":"aggr1","uuid":"44857d47-851f-11ee-84de-4b7ecb818153"}],"svm":{"name":"svm","uuid":"0d9b83f3-8520-11ee-84de-4b7ecb818153"},"constituents_per_aggregate":8} Success -
"Tue Nov 28 07:28:35 2023" FsxId0762660cbce3713bf-01 http        52.87.48.44   FsxId0762660cbce3713bf fsx-control-plane PATCH /api/storage/volumes/b7139774-8dbf-11ee-84de-4b7ecb818153 : {"comment":""}                                                                                         Success -
"Tue Nov 28 07:28:35 2023" FsxId0762660cbce3713bf-01 http        35.169.159.241
                                                                               FsxId0762660cbce3713bf fsx-control-plane POST /api/private/cli : {"input":"set -privilege diagnostic ; system node run -node FsxId0762660cbce3713bf-01 -command wafl obj_cache flush"}                                                                                         Success -
"Tue Nov 28 07:28:35 2023" FsxId0762660cbce3713bf-01 http        35.169.159.241
                                                                               FsxId0762660cbce3713bf fsx-control-plane POST /api/private/cli : {"input":"set -privilege diagnostic ; system node run -node FsxId0762660cbce3713bf-02 -command wafl obj_cache flush"}                                                                                         Success -
"Tue Nov 28 07:28:35 2023" FsxId0762660cbce3713bf-01 http        35.169.159.241
                                                                               FsxId0762660cbce3713bf fsx-control-plane POST /api/cluster/licensing/access_tokens/ : {"client_secret":***,"grant_type":"client_credentials","client_id":"clientId"}                                                                                         Success -
"Tue Nov 28 07:28:36 2023" FsxId0762660cbce3713bf-01 http        35.169.159.241
                                                                               FsxId0762660cbce3713bf fsx-control-plane POST /api/snapmirror/relationships/?return_records=true : {"destination":{"path":"svm:restored_fg_vol"},"restore":true,"source":{"path":"amazon-fsx-ontap-backup-us-east-1-b0bc6fd9-bdd6a1d0:/objstore/0c000000-01f6-b3ef-0000-0000006db8d5_rst","uuid":"0c000000-01f6-b3ef-0000-0000006db8d5"}}                                                                                         Success -
"Tue Nov 28 07:28:36 2023" FsxId0762660cbce3713bf-01 http        35.169.159.241
                                                                               FsxId0762660cbce3713bf fsx-control-plane POST /api/snapmirror/relationships : uuid=bdfa23f2-8dbf-11ee-84de-4b7ecb818153 isv_name="AWS FSx"                                                                                         Success -
"Tue Nov 28 07:28:36 2023" FsxId0762660cbce3713bf-01 http        52.204.237.29 FsxId0762660cbce3713bf fsx-control-plane POST /api/cluster/licensing/access_tokens/ : {"client_secret":***,"grant_type":"client_credentials","client_id":"clientId"}                                                                                         Success -
"Tue Nov 28 07:28:36 2023" FsxId0762660cbce3713bf-01 http        52.204.237.29 FsxId0762660cbce3713bf fsx-control-plane POST /api/snapmirror/relationships/bdfa23f2-8dbf-11ee-84de-4b7ecb818153/transfers : isv_name="AWS FSx"                                                                                         Success -

timestamp                  node                      application location      vserver                username          input                                                                                         state   message
-------------------------- ------------------------- ----------- ------------- ---------------------- ----------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------- -------
"Tue Nov 28 07:28:36 2023" FsxId0762660cbce3713bf-01 http        52.204.237.29 FsxId0762660cbce3713bf fsx-control-plane POST /api/snapmirror/relationships/bdfa23f2-8dbf-11ee-84de-4b7ecb818153/transfers?return_records=true : {"source_snapshot":"backup-03f97a5040dee27a3"}                                                                                         Success -
"Tue Nov 28 07:31:35 2023" FsxId0762660cbce3713bf-01 http        52.87.48.44   FsxId0762660cbce3713bf fsx-control-plane POST /api/private/cli : {"input":"set -privilege diagnostic ; volume efficiency inactive-data-compression stop -volume restored_fg_vol -vserver svm"}                                                                                         Error   Volume "restored_fg_vol" does not exist in Vserver "svm". Reason: entry doesn't exist.
"Tue Nov 28 07:31:36 2023" FsxId0762660cbce3713bf-01 http        52.87.48.44   FsxId0762660cbce3713bf fsx-control-plane PATCH /api/storage/volumes/b7139774-8dbf-11ee-84de-4b7ecb818153 : {"tiering":{"policy":"SNAPSHOT_ONLY","min_cooling_days":2},"nas":{"path":"/restored_fg_vol"},"snapshot_policy":{"name":"default"}}                                                                                         Success -
"Tue Nov 28 07:33:09 2023" FsxId0762660cbce3713bf-01 http        35.169.159.241
                                                                               FsxId0762660cbce3713bf fsx-control-plane GET /api/private/cli/volume/?fields=uuid%2Cconstituent_count                                                                                         Success -
"Tue Nov 28 07:33:09 2023" FsxId0762660cbce3713bf-01 http        35.169.159.241
                                                                               FsxId0762660cbce3713bf fsx-control-plane GET /api/private/cli/vserver/cifs/check/?fields=status%2Cstatus_details                                                                                         Success -
"Tue Nov 28 07:33:39 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147  FsxId0762660cbce3713bf admin             GET /api/private/cli/storage/failover?fields=node,possible,reason                                                                                         Success -
"Tue Nov 28 07:33:39 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147  FsxId0762660cbce3713bf admin             GET /api/private/cli/storage/aggregate?fields=raidstatus%2Ccomposite%2Croot%2Cuuid                                                                                         Success -
"Tue Nov 28 07:43:39 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147  FsxId0762660cbce3713bf admin             GET /api/private/cli/storage/failover?fields=node,possible,reason                                                                                         Success -
"Tue Nov 28 07:43:39 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147  FsxId0762660cbce3713bf admin             GET /api/private/cli/storage/aggregate?fields=raidstatus%2Ccomposite%2Croot%2Cuuid                                                                                         Success -
"Tue Nov 28 07:53:38 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147  FsxId0762660cbce3713bf admin             GET /api/private/cli/storage/failover?fields=node,possible,reason                                                                                         Success -

timestamp                  node                      application location      vserver                username          input                                                                                         state   message
-------------------------- ------------------------- ----------- ------------- ---------------------- ----------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------- -------
"Tue Nov 28 07:53:38 2023" FsxId0762660cbce3713bf-01 http        198.19.1.147  FsxId0762660cbce3713bf admin             GET /api/private/cli/storage/aggregate?fields=raidstatus%2Ccomposite%2Croot%2Cuuid                                                                                         Success -
20 entries were displayed.

AWS CLIからリストア時に指定したバックアップと同じ名前のSnapshotを使ってリストアしていることが分かります。

個人的には内部でnode runコマンドを叩いていることにロマンを感じます。私も叩いて新たなる扉を開きたいです。

FlexGroupが使いやすくなりました

Amazon FSx for NetApp ONTAPでFlexGroupのバックアップができるようになったアップデートを紹介しました。

FlexGroupが使いやすくなりましたね。徐々にONTAP CLIを使わなくとも操作できる範囲が広がってきて嬉しいです。

この記事が誰かの助けになれば幸いです。

以上、AWS事業本部 コンサルティング部の のんピ(@non____97)でした!

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.